import { IRouteComponentProps, Redirect } from 'umi';

// todo 全局layouts更多的用于做重定向

export default function Layout({
  children,
  location,
  route,
  history,
  match,
}: IRouteComponentProps) {
  // console.log(location);

  // return (
  //   <>
  //     {children}
  //     {/* <footer>@qianfeng</footer> */}
  //   </>
  // );

  if (location.pathname === '/') {
    return <Redirect to="/home"></Redirect>;
  } else {
    return children;
  }
}
